const key = "react_token"

const getToken = () => {
  return window.localStorage.getItem(key) || ""
}

const setToken = value => {
  window.localStorage.setItem(key, value)
}

const clearToken = () => {
  window.localStorage.removeItem(key)
}

const isAuth = () => {
  return !!getToken()
}

export { getToken, setToken, clearToken, isAuth }
